package cn.linkai.redis;

import org.junit.Test;
import redis.clients.jedis.Jedis;

public class JedisTest {

    @Test
    public void testsetandget(){
        Jedis jedis=new Jedis("119.29.8.201",6379);
        jedis.auth("helloredis");
        jedis.set("name","hello link");
        String name = jedis.get("name");
        System.out.println(name);
        jedis.close();
    }

    @Test
    public void testList(){
        Jedis jedis=new Jedis("119.29.8.201",6379);
        jedis.auth("helloredis");
        for(int i=0;i<1000000;i++){
            jedis.rpush("l1",String.valueOf(i));
        }
    }

}
